package com.dlc.shop.live.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.live.common.model.LiveRoomProd;
import com.dlc.shop.live.common.vo.LiveRoomProdVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @author TRACK
 */
public interface LiveRoomProdMapper extends BaseMapper<LiveRoomProd> {

    /**
     * 根据商品id获取正常状态下的直播间id列表
     * @param prodId
     * @return
     */
    List<Long> listRoomIdByProdId(@Param("prodId") Long prodId);

    /**
     * 获取直播间商品 prodId
     * @param roomId
     * @return
     */
    List<LiveRoomProdVO> listLiveRoomProd(@Param("roomId") Long roomId);

    /**
     * 获取直播间商品 prodInfo
     * @param roomId
     * @param lang
     * @return
     */
    List<LiveRoomProdVO> listLiveRoomProdInfo(@Param("roomId") Long roomId, @Param("lang") Integer lang);

    /**
     * 更新讲解状态
     * @param roomId
     * @param prodId
     * @param explainStatus
     * @return
     */
    int updateExplainStatus(@Param("roomId") Long roomId, @Param("prodId") Long prodId, @Param("explainStatus") Integer explainStatus);
}
